package simplevideochat.communication.connection
{
	import flash.events.Event;
	
	/**
	 * Класс событий класса Connection
	 * @author Alexey Ustinov
	 */
	public class ConnectionEvent extends Event 
	{
		
		static public const CONNECTED:String = "connection_event_connected";
		static public const MESSAGE_RECEIVED:String = "connection_event_message_received";
		static public const DISCONNECTED:String = "connection_event_disconnected";
		static public const ERROR:String = "connection_event_error";
		
		private var _connectionData:Object;
		
		public function ConnectionEvent(type:String, connectionData:ConnectionEventData=null, bubbles:Boolean=false, cancelable:Boolean=false) 
		{
			super(type, bubbles, cancelable);
			this.connectionData = connectionData;
		}
		
		public function get connectionData():Object
		{
			return _connectionData;
		}
		
		public function set connectionData(value:Object):void 
		{
			_connectionData = value;
		}
		
	}

}